Skip to content

Java AI Integration / Agents - #2848

Open
MattSchur wants to merge 9 commits into
mainfrom
java-ai
Open

Java AI Integration / Agents#2848
MattSchur wants to merge 9 commits into
mainfrom
java-ai

Conversation

@MattSchur

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread java/ai.md
```yaml
cds:
ai.chat.models:
llm:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
llm:
default:

Comment thread java/ai.md
| `options` | Additional provider-specific parameters. |

An agent picks its model configuration via the `@agent.llm` annotation, which defaults to
the configuration named `llm`. If no configuration matches, CAP Java falls back to `aicore`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
the configuration named `llm`. If no configuration matches, CAP Java falls back to `aicore`
the configuration named `default`. If no configuration matches, CAP Java falls back to `aicore`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the annotation look like @agent.llm: "myllmconfig" then? @agent.llm is the static annotation name and "myllmconfig" is the key in application.yaml? if the annotation is missing, it will use the "default" key.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but the default key is (currently) called llm

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I thought based on your comment that this was changed to default. @agent.llm: 'llm' is harder to understand than @agent.llm: 'default'. I think this is nothing we can change now, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also would prefer default here; it's currently llm to be in sync with the Node runtime, they use cds.requires.llm for the config.

Comment thread java/ai.md
```yaml
cds:
ai.chat.models:
llm:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
llm:
default:

Comment thread java/ai.md
```yaml
cds:
ai.chat.models:
llm:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
llm:
default:

smahati
smahati previously approved these changes Aug 31, 2026
Comment thread java/ai.md
An agent turns a CDS service into a conversational endpoint. It answers natural-language
requests by using the service's entities, actions, and functions as tools, backed by an
LLM. Agents speak the [A2A protocol](https://a2a-protocol.org/), so any A2A-compatible
client can talk to them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should spend a word on the supported a2a protocol version. As Agent Gateway only support version 0.3, we decided to support by default only 0.3. We have an (undocumented) property which allows to activate 1.0.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@StefanHenke, @beckermarc feel free to add

Comment thread java/ai.md
Comment thread java/ai.md
| `options` | Additional provider-specific parameters. |

An agent picks its model configuration via the `@agent.llm` annotation, which defaults to
the configuration named `llm`. If no configuration matches, CAP Java falls back to `aicore`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the annotation look like @agent.llm: "myllmconfig" then? @agent.llm is the static annotation name and "myllmconfig" is the key in application.yaml? if the annotation is missing, it will use the "default" key.

Comment thread java/ai.md

### SAP AI Core

With an `aicore` service binding, requests run through

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does aicore offer different service plans which might be relevant here?

Comment thread java/ai.md Outdated
Comment thread java/ai.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants